package org.example.day20240812;

public class text5 {
    public static void main(String[] args) {
        //小明爸爸十年前的年龄是小明年龄的6倍，小明爸爸十年后的年龄是小明的2倍，求小明今年多少岁
        boolean x = true;
        int ming=10;
        while(x){
            int dad = 6*(ming-10);
            int Ndad = (ming+10)*2;
            if(Ndad-dad == 20){
                System.out.println(ming);
                x = false;
            }
            ming++;
        }
    }
}
